From 69941c321ee32c4ce177136f496ad2e8c455db62 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 29 Nov 2011 14:17:27 +0000 Subject: [PATCH] xl: the name field in a guest config file is mandatory Signed-off-by: Ian Campbell Committed-by: Ian Jackson Acked-by: Ian Jackson --- tools/libxl/xl_cmdimpl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index a9b7ef2e39..d1d5df56ba 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -575,8 +575,10 @@ static void parse_config_data(const char *configfile_filename_report, if (!xlu_cfg_get_long (config, "hap", &l)) c_info->hap = l; - if (xlu_cfg_replace_string (config, "name", &c_info->name)) - c_info->name = strdup("test"); + if (xlu_cfg_replace_string (config, "name", &c_info->name)) { + fprintf(stderr, "Domain name must be specified."); + exit(1); + } if (!xlu_cfg_get_string (config, "uuid", &buf) ) { if ( libxl_uuid_from_string(&c_info->uuid, buf) ) { -- 2.30.2